﻿<html><head>
<title>Data Akun with DB</title>
<link rel='icon' type='image/vnd.microsoft.icon' href='res/hand.ico'></link>
<!--<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js' type='text/javascript'></script>-->
<script src='res/jQuery.js' type='text/javascript'></script>

<style type="text/css"><!--
body{font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;width:100%;height:100%;padding:0;margin:0;color:#333333;background:white url(res/aing%20grup%20coverBG.jpg) no-repeat fixed bottom right;background-size:auto;overflow-y:scroll}
pre{font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;word-wrap:break-word;white-space:pre-wrap;}
.tombol, .tombol-putih{font-size:11px;color:#CCCCCC;font-weight:bold; text-align:center; line-height:11px; white-space:nowrap;cursor:pointer; border-width:1px;border-style:solid;border-color:#29447E #29447E #1A356E;border-radius:3px;background:#5B74A8 url("res/0VDksn8o5BR.png") no-repeat scroll 0 0;box-shadow:0pt 1px 0pt rgba(0,0,0,0.1);display:inline-block; vertical-align:middle; padding:3px 6px;}
.tombol:hover{color:#FFFFFF}
.tombol-putih{background-position:0 -147px; background-color:#eeeeee; color:#666666; border-color:#999999 #999999 #888888;}
.tombol-putih:hover{color:#000000}
.dip-luar{margin-bottom:5px;border-bottom:1px solid rgba(200,200,200,0.5);padding:5px;text-align:left;color:#aaa;background-color:rgba(255,255,225,0.5)}
.dip-dalem{font-size:11px;background-color:rgba(255,255,255,0.5);margin:1px 0}
.imprut{width:300px;background-color:transparent;border:none;color:gray;font-size:11px;padding:0;vertical-align:middle}
.gambar-akun{float:left;margin-right:5px;width:50px;text-align:center;overflow:hidden}
.accounts{font-size:11px;background-color:rgba(200,255,200,0.5);margin:1px 0}
.groups{font-size:11px;background-color:rgba(200,200,255,0.5);margin:1px 0}
a, a:link{cursor:pointer;color:#9BB9F8;text-decoration:none}
a:hover{text-decoration:underline}
input, select, textarea{cursor:pointer;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;color:#333;width:250px;padding:2px;border:1px solid lightblue;vertical-align:middle;background-color:rgba(255,255,255,0.5);border-radius:3px;}
textarea{cursor:default;color:#aaa;background-color:rgba(28,28,28,0.25)}
select{width:auto;padding:1px;border:none}
.konsol{width:500px;margin:auto;position:relative;padding:5px;border-radius:7px;border:7px solid rgba(200,200,255,0.5);background-color:rgba(0,0,100,0.5);font-size:11px;color:#ccc}
a.tombol-komen, a.tombol-komen:visited{padding: 2px 4px 2px 22px;margin: 1px;background: #ECEEF5 url(res/small_icon_blogger.gif) no-repeat scroll 4px 2px;color: #3b5998;border: 1px solid #cad4e7;font-size: 11px;line-height: 14px;border-radius: 3px;vertical-align:middle;display:inline-block}
a.tombol-komen:hover{background-color: #ebedf4;border-color: #9dacce;text-decoration: none}
.bingkai{font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;overflow:hidden;color:#ccc;background-color:rgba(0,0,0,0.5);padding:5px;border-radius:7px}
#status{position:relative;width:350px;margin:auto}
#impoh{position:fixed;top:10px;right:10px;width:300px}
#akuns{position:fixed;top:10px;left:10px;width:300px}
#akuns input{float:none;font-size:9px;vertical-align:middle;width:150px;padding:0;border:none;background-color:transparent;color:#aaa}
#akuns label{padding:0;float:none;font-size:9px;vertical-align:middle}
.judul{margin:-5px -5px 5px -5px;border-bottom:1px solid gray;padding:5px;background-color:rgba(0,0,0,0.25);font-weight:bold;color:#CC6}
.judul a{vertical-align:middle}
.baris-isi .judul{padding:1px 3px 3px;margin:-3px -3px 1px -3px;font-weight:normal;border-radius:3px 3px 0px 0px}
.baris-isi{clear:both;color:#EEE;margin:1px 0;background-color:rgba(0,0,0,0.1);padding:3px}
dl.baris-isi dt{font-style:italic;font-weight:normal;font-size:11px}
.klir{clear:both}
.pp{width:50px;float:left;border-radius:3px}
.akun-info{margin-left:55px}
.jam{text-align:right;font-size:8px;color:#aa6;padding-top:3px;font-style:italic}
.erow{cursor:pointer;color:lightgreen}
.erow:hover{color:pink}
.tab, .tab-aktip{font-size:11px;padding:2px 3px 3px 3px;display:inline-block;cursor:pointer;border-left:1px outset rgba(28,28,28,0.5);border-top:1px outset rgba(28,28,28,0.5);border-right:1px outset rgba(28,28,28,0.5);border-bottom:none;border-radius:3px 3px 0px 0px;margin:0px 2px 0px 0px;background:rgba(28,28,28,0.5);color:orange}
.tab{border-left:1px outset rgba(28,28,28,0.1);border-top:1px outset rgba(28,28,28,0.1);border-right:1px outset rgba(28,28,28,0.1);border-bottom:none;background:rgba(28,28,28,0.1);color:#aaa}
.isi-tab{display:none}
.isi-tab-aktip{display:block}
#masukan-porm input{float:right}
#masukan-porm label{float:left;padding-top:4px}
code{color:#8C8}

.section, .body-fauxcolumns, .content, #google_top_static_frame{display:none}
--></style>

</head><body>

<script type="text/javascript">
<!--//
var aing={
  dbUrls:[
    {email:"The.Kill3rs@facebook.com",uri:"https://script.google.com/macros/s/AKfycbwxAZsMax8cyaDs2BEZgWck1L1HDB0Lb8a1IG0QimBmaeOyXuY/exec"}
  ],
  loding:'<span class="loding"><img style="vertical-align:bottom" src="http://static.ak.fbcdn.net/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif"/></span>',
  aduk:function(b){var a=b.sort(function(){return 0.5-Math.random()});a.reverse();a=a.sort(function(){return 0.5-Math.random()});return a},
  jamBaraTeh:function(a){var f={"01":"January","02":"February","03":"March","04":"April","05":"May","06":"June","07":"July","08":"August","09":"September","10":"October","11":"November","12":"December"},dword=["Minggu","Senen","Selasa","Rabu","Kamis","Jum'at","Sabtu"];var d=new Date(),e=d.toUTCString();var g=dword[d.getDay()],detn=d.getDate(),monthn=d.getMonth()+1,fyearn=d.getFullYear(),hourn=d.getHours(),mntn=d.getMinutes(),scndn=d.getSeconds(),tzn=d.getTimezoneOffset();if(monthn<10){monthn="0"+monthn}if(hourn>12){var h="PM";if(hourn<15){h="siang"}else if(hourn<18){h="sore"}else if(hourn<20){h="magrib"}else{h="malem"}}else{var h="AM";if(hourn<4){h="dini hari"}else if(hourn<6){h="subuh"}else if(hourn<10){h="pagi"}else{h="siang"}}var i=g+", "+detn+" "+f[monthn]+" "+fyearn+" jam "+hourn+":"+mntn+" "+h;tzn=Math.round(tzn/-60);if(tzn>0){if(tzn<10){tzn="+0"+tzn+"00"}else{tzn="+"+tzn+"00"}}else{tzn=(tzn*tzn);if(tzn<10){tzn="-0"+tzn+"00"}else{tzn="-"+tzn+"00"}}var j=Date.parse(e),isoformn=fyearn+"-"+monthn+"-";if(detn<10){isoformn+="0"}isoformn+=detn+"T";if(hourn<10){isoformn+="0"}isoformn+=hourn+":";if(mntn<10){isoformn+="0"}isoformn+=mntn+":";if(scndn<10){isoformn+="0"}isoformn+=scndn+tzn;if(a==null||a==""){var k=i,q=j,p=i,isoform=isoformn}else{var l=a;if(l.split("T")[1]&&l.split("T")[0].split("-")[2]){var m="0000";if(l.split("+")[1]){m=l.split("+")[1]}else if(l.split(".")[1]){m=l.split(".")[1]}var n=l.split("T")[0].split("-")[2]+" "+f[l.split("T")[0].split("-")[1]]+" "+l.split("T")[0].split("-")[0]+" "+l.split("T")[1].split("+")[0].split(".")[0]+" GMT+"+m;var b=new Date(n),c=b.toUTCString();var o=dword[b.getDay()],det=b.getDate(),month=b.getMonth()+1,fyear=b.getFullYear(),hour=b.getHours(),mnt=b.getMinutes(),scnd=b.getSeconds(),tz=b.getTimezoneOffset();if(month<10){month="0"+month}if(hour>12){var h="PM";if(hour<15){h="Siang"}else if(hour<18){h="Sore"}else if(hour<20){h="Magrib"}else{h="Malem"}}else{var h="AM";if(hour<4){h="Dini hari"}else if(hour<6){h="Subuh"}else if(hour<10){h="Pagi"}else{h="Siang"}}var p=o+", "+det+" "+f[month]+" "+fyear+" jam "+hour+":"+mnt+" "+h;tz=Math.round(tz/-60);if(tz>0){if(tz<10){tz="+0"+tz+"00"}else{tz="+"+tz+"00"}}else{tz=(tz*tz);if(tz<10){tz="-0"+tz+"00"}else{tz="-"+tz+"00"}}var q=Date.parse(c),isoform=fyear+"-"+month+"-";if(det<10){isoform+="0"}isoform+=det+"T";if(hour<10){isoform+="0"}isoform+=hour+":";if(mnt<10){isoform+="0"}isoform+=mnt+":";if(scnd<10){isoform+="0"}isoform+=scnd+tz;var r=j-q,iraha=Math.round(r/1000),k=p;if(iraha<0){}else if(iraha<1){k="Karak ge crot bieu"}else if(iraha<60){k="Nembe "+iraha+" detik bieu"}else if(iraha<3600){k="Nembe "+Math.round(r/60000)+" menit bieu"}else if(iraha<86400){k=Math.round(r/3600000)+" jam tadi"}else if(iraha<604800){var s=Math.round(r/86400000);if(s==1){var x="baru se"}else{var x="Udah "+s+" "}k=x+"hari kemaren"}else if(iraha<2630000){var t=Math.round(r/604800000);if(t==1){var y="baru se"}else{var y="Udah "+t+" "}k=y+"minggu kemaren"}else if(iraha<31560000){var u=Math.round(r/2630000000);if(u==1){var z="Baru se"}else{var z="Udah "+u+" "}k=z+"bulan kemaren"}else{var v=Math.round(r/31560000000);if(v==1){var A="Baru se"}else{var A="Udah "+v+" "}k=A+"tahun kebelakang"}}else{var k=a,q=a,p=a,isoform=a}}var w={tag:k,ms:q,word:p,iso:isoform};return w},
  cekInput:function(elm){var val=$(elm).val();if(val==null||val==''){aing.bgmasukanasal=$(elm).css('background-color');aing.elmmasukan=$(elm);$(elm).css({'background-color':'red'});setTimeout("$(aing.elmmasukan).css({'background-color':aing.bgmasukanasal})",100);setTimeout("$(aing.elmmasukan).css({'background-color':'red'})",200);setTimeout("$(aing.elmmasukan).css({'background-color':aing.bgmasukanasal})",300);return false}else{return val}},
  repos:function(d,e){if(e==null||e==""){e=window}var a=$(d).height(),b=$(e).height(),c=(b-a)/3;if(c<5){c=5}$(d).animate({top:c+"px"})},
  aturTinggi:function(c,d){var a=$(c).height(),b=$(window).height()-20,e=($(c+" .judul:first").height()+20+$(c+" .judul").next().height()),f=(b-e);if(a>b){$(d).css({"overflow-y":"scroll",height:f+"px"})}else if(a<f){$(d).css({"overflow-y":"auto",height:"auto"})}},
  tabklik:function(hoh,wot){$('#akun-daptar-tab .tab-aktip').removeClass('tab-aktip').addClass('tab');$(hoh).removeClass('tab').addClass('tab-aktip');$('.isi-tab-aktip').removeClass('isi-tab-aktip').addClass('isi-tab');$(wot).removeClass('isi-tab').addClass('isi-tab-aktip');aing.aturTinggi('#akuns','.isi-tab-aktip');},
  tombolBekTuMenu:function(){return '<div class="baris-isi" style="text-align:left"><span class="tombol-putih" onClick="$(\'#status .judul\').html(\'Menu\').css({\'background-color\':\'rgba(0,0,0,0.5)\'});$(\'#status .isi\').html(aing.tombolMenu());aing.repos(\'#status\')" style="font-weight:normal;padding:1px 2px;darkgreen">\xAB Back to menu</span></div>'},
  tombolRemupAkunEror:function(sapa){
    return '<div class="baris-isi" style="text-align:left"><span class="tombol-putih" onClick="$(this).hide();aing.delakon(\''+sapa.tkn+'\')" style="font-weight:normal;padding:1px 2px;color:darkred">Remove from DB</span></div>';
  },
  tombolMenu:function(){
    var a='<center>';
    a+='<span class="tombol" onClick="aing.bukaAddNewAccount()" style="margin:2px">Add a new account</span> ';
    a+='<span class="tombol" onClick="aing.bukaInsertScriptDB()" style="margin:2px">Change ScriptDB URL</span> ';
    a+='<span class="tombol" onClick="aing.bukaAddNewAccount(\'apdet\')" style="margin:2px;color:#aca" onMouseOver="this.style.color=\'#afa\'" onMouseOut="this.style.color=\'#aca\'">Update account</span> ';
    a+='<span class="tombol" onClick="aing.bukaAddNewAccount(\'delet\')" style="margin:2px;color:#caa" onMouseOver="this.style.color=\'#faa\'" onMouseOut="this.style.color=\'#caa\'">Remove account</span> ';
    a+='<span class="tombol" onClick="$(this).hide();aing.prinjson()" style="margin:2px">Print JSON</span> ';
    a+='<span class="tombol-putih" onClick="aing.ambilDaftarAkun(aing.myPrevDbUrl)" style="margin:2px">Refresh</span> ';
    a+='</center>';
    return a;
  },
  delakon:function(wot){aing.bukaAddNewAccount('delet');$("#masukan-token").val(wot);aing.addToDB('delet')},
  bukaAddNewAccount:function(wot){
    var nyunul='Add a new account',disp='',dispil='',btn='Add to';
    if(wot=='apdet'){nyunul='Update account';dispil=' style="display:none"';btn='Update'}else if(wot=='delet'){nyunul='Remove account';disp=' style="display:none"';dispil=' style="display:none"';btn='Remove from'}
    $('#status .judul').html(nyunul).css({'background-color':'rgba(0,0,100,0.5)'});
    var a='<div id="masukan-porm">';
    a+='<div class="baris-isi"'+disp+'><label for="masukan-fb-pswd">FB Password:</label> <input type="text" id="masukan-fb-pswd" onClick="this.select()"/><div style="clear:both"></div></div>';
    a+='<div class="baris-isi"'+disp+'><label for="masukan-imel-pswd">Email Password:</label> <input type="text" id="masukan-imel-pswd" onClick="this.select()"/><div style="clear:both"></div></div>';
    a+='<div class="baris-isi"><label for="masukan-token">Token:</label> <input type="text" id="masukan-token" onClick="this.select()"/><div style="clear:both"></div></div>';
    a+='<div class="baris-isi" style="background-color:transparent;text-align:right">';
    a+='<select id="pilihan-simpan"'+dispil+'><option value="rimup"';if(wot=='delet'){a+=' selected'}a+='>Remove</option><option value="riples"';if(wot!='delet'){a+=' selected'}a+='>Replace</option></select> ';
    a+='<span class="tombol" onClick="aing.addToDB(\''+wot+'\')">'+btn+' DB</span><div style="clear:both"></div></div>';
    a+=aing.tombolBekTuMenu();
    a+='</div>';
    a+='<div id="masukan-sts" style="display:none"></div>';
    $('#status .isi').html(a);aing.repos('#status');
  },
  myPrevDbUrl:'',myPrevDbImel:'',
  bikinKotakUser:function(p,b){
    var a='<div id="akun_id_';if(p&&p.id){a+=p.id}else{a+=b.id}a+='" class="baris-isi" style="';if(p&&p.id){}else if(p&&p.status){a+='background-color:rgba(200,0,0,0.1);'}else{a+='background-color:rgba(200,200,0,0.1);'}a+='display:none"><div class="klir"></div>';
    a+='<img src="';if(p&&p.picture){if(p.picture.data&&p.picture.data.url){a+=p.picture.data.url}else{a+=p.picture}}else{a+='http://graph.facebook.com/';if(p&&p.id){a+=p.id}else{a+=b.id}a+='/picture?type=square'}a+='" class="pp"/>';
    a+='<div class="akun-info">';
    a+='<a href="http://fb.com/';if(p&&p.username){a+=p.username}else if(p&&p.id){a+=p.id}else if(b.username){a+=b.username}else{a+=b.id}a+='" target="_blank">';if(p&&p.name){a+=p.name}else if(p&&p.id){a+=p.id}else if(b.name){a+=b.name}else{a+=b.id}a+='</a>';
    a+=' <span class="erow" onClick="if($(this).next().css(\'display\')==\'none\'){$(this).next().fadeIn();$(this).html(\'▼\')}else{$(this).next().fadeOut();$(this).html(\'►\')}">►</span>';
    a+='<div style="display:none;background-color:rgba(0,28,28,0.1)">';
    a+='<div><label for="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-id">ID:</label> <input type="text" readonly id="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-id" value="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='" onClick="this.select()"/></div>';
    if(p&&p.username){a+='<div><label for="'+p.id+'-username">Username:</label> <input type="text" readonly id="'+p.id+'-username" value="'+p.username+'" onClick="this.select()"/></div>'}else
    if(b.username){a+='<div><label for="'+b.id+'-username">Username:</label> <input type="text" readonly id="'+b.id+'-username" value="'+b.username+'" onClick="this.select()"/></div>'}
    if(p&&p.birthday){a+='<div><label for="'+p.id+'-birthday">Birthday:</label> <input type="text" readonly id="'+p.id+'-birthday" value="'+p.birthday+'" onClick="this.select()"/></div>'}else
    if(b.birthday){a+='<div><label for="'+b.id+'-birthday">Birthday:</label> <input type="text" readonly id="'+b.id+'-birthday" value="'+b.birthday+'" onClick="this.select()"/></div>'}
    a+='<div><label for="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-token">Token:</label> <input type="text" readonly id="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-token" value="'+b.tkn+'" onClick="this.select()"/></div>';
    a+="</div>";
    if(p&&p.email){a+='<div><label for="'+p.id+'-imel">Email:</label> <input type="text" readonly id="'+p.id+'-imel" value="'+p.email+'" onClick="this.select()"/></div>'}else
    if(b.imel){a+='<div><label for="'+b.id+'-imel">Email:</label> <input type="text" readonly id="'+b.id+'-imel" value="'+b.imel+'" onClick="this.select()"/></div>'}
    if(b.fbpswd){a+='<div><label for="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-fb-pswd">FB Password:</label> <input type="text" readonly id="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-fb-pswd" value="'+b.fbpswd+'" onClick="this.select()"/></div>'}
    if(b.imelpswd){a+='<div><label for="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-imel-pswd">Email Password:</label> <input type="text" readonly id="';if(p&&p.id){a+=p.id}else{a+=b.id}a+='-imel-pswd" value="'+b.imelpswd+'" onClick="this.select()"/></div>'}
    if(b.status_update_count){a+='<div style="vertical-align:middle;display:inline-block;margin-right:7px;font-size:10px"><span style="color:#6aa">Status Update:</span> <span style="color:#ca8">'+b.status_update_count+'x</span></div>'}
    if(b.posttogroup_count){a+='<div style="vertical-align:middle;display:inline-block;margin-right:7px;font-size:10px"><span style="color:#6aa">Post to Group:</span> <span style="color:#ca8">'+b.posttogroup_count+'x</span></div>'}
    if(b.time){a+='<div class="jam">'+aing.jamBaraTeh(b.time).tag+'</div>'}
    a+="</div>";
    return a;
  },
  palidasiAkuns:function(){
    if(aing.data.ke<=aing.data.akun.length){
      $('#status .isi').html('<div class="baris-isi">'+aing.data.ke+' Checking <a href="http://fb.com/'+aing.data.akun[aing.data.ke-1].id+'" target="_blank">'+aing.data.akun[aing.data.ke-1].name+'</a> '+aing.loding+'</div>');
      aing.repos('#status');
      $.getJSON('https://graph.facebook.com/me',{fields:'id,name,username,picture,email,birthday,groups.fields(id,name,administrator),accounts.fields(name,access_token,category,is_published)',access_token:aing.data.akun[aing.data.ke-1].tkn},function(p){
        var b=aing.data.akun[aing.data.ke-1];
        if(!aing.data.akunOke){aing.data.akunOke=[]}
        if(aing.gakPerawan){aing.data.akunOke=$.grep(aing.data.akunOke,function(aya){return aya.id!=b.id})}
        aing.data.akunOke.push(b);
        $('#akun-aktip-tab .jumlah').html('('+aing.data.akunOke.length+')');
        $('#daftar-akun').prepend(aing.bikinKotakUser(p,b)+'<div class="klir"></div></div>');
        $('#akun_id_'+b.id).show('slow');
        $('#akuns .judul .jumlah').html(aing.data.ke+' of '+aing.data.akun.length);
        aing.aturTinggi('#akuns','#daftar-akun');
        if(p&&p.groups&&p.groups.data&&p.groups.data.length!=0){
          var adminlin='lain';
          for(y in p.groups.data){
            var pdx=p.groups.data[y];
            if(pdx.id&&pdx.administrator){
              if($("#"+pdx.id).length==0){
                if(!aing.data.grup){aing.data.grup=[]}aing.data.grup.push(pdx);aing.data[pdx.id]=[];
                var c='<div id="'+pdx.id+'" class="baris-isi" style="border:1px solid rgba(0,0,0,0.5);padding-bottom:2px;margin-bottom:5px">';
                c+='<div class="judul"><div class="klir"></div><div style="float:right"><span class="tombol-putih" onClick="aing.prinjson(aing.data[\''+pdx.id+'\'],\'aing.data[\\\''+pdx.id+'\\\']\')" style="font-size:10px;line-height:10px;font-weight:normal;padding:1px 4px">Print JSON <span id="'+pdx.id+'-jumlah-admins">( 0 )</span></span></div>';c+='<a href="http://facebook.com/groups/'+pdx.id+'" target="_blank">';if(pdx.name){c+=pdx.name}else{c+=pdx.id}c+='</a>';c+=' <label for="'+pdx.id+'-id" style="white-space:pre;word-wrap:nowrap"><span style="vertical-align:middle">ID:</span> <input type="text" readonly id="'+pdx.id+'-id" value="'+pdx.id+'" onClick="this.select()" style="width:100px"/></label><div class="klir"></div></div>';
                c+='<div class="saha"></div>';
                c+='</div>';
                $('#daftar-akun-grup').prepend(c);
              }
              aing.data[pdx.id].push(b);
              $('#'+pdx.id+' .saha').prepend('<div class="baris-isi">'+$('#akun_id_'+b.id).html()+'</div>');
              $('#'+pdx.id+'-jumlah-admins').html('( '+aing.data[pdx.id].length+' )');
              adminlin='hooh';
            }
          }
          if(adminlin=='hooh'){
            if(!aing.data.akunGrup){aing.data.akunGrup=[]}aing.data.akunGrup.push(b);
            $('#akun-grup-tab .jumlah').html('('+aing.data.akunGrup.length+')');
          }
        }
        if(p&&p.accounts&&p.accounts.data&&p.accounts.data.length!=0){
          var pejadminlin='lain';
          for(x in p.accounts.data){
            var pdx=p.accounts.data[x];
            if(pdx.id&&pdx.access_token){
              if($("#"+pdx.id).length==0){
                if(!aing.data.page){aing.data.page=[]}aing.data.page.push(pdx);aing.data[pdx.id]=[];
                var c='<div id="'+pdx.id+'" class="baris-isi" style="border:1px solid rgba(0,0,0,0.5);padding-bottom:2px;margin-bottom:5px">';
                if(pdx.is_published){c+='<div>'}else{c+='<span class="erow" onClick="if($(this).next().css(\'display\')==\'none\'){$(this).next().fadeIn();$(this).html(\'Hide unpublished page ▼\')}else{$(this).next().fadeOut();$(this).html(\'Show unpublished page ►\')}">Show unpublished page ►</span><div style="display:none;padding-bottom:3px">'}
                c+='<div class="judul"><div class="klir"></div><div style="float:right"><span class="tombol-putih" onClick="aing.prinjson(aing.data[\''+pdx.id+'\'],\'aing.data[\\\''+pdx.id+'\\\']\')" style="font-size:10px;line-height:10px;font-weight:normal;padding:1px 4px">Print JSON <span id="'+pdx.id+'-jumlah-admins">( 0 )</span></span></div>';c+='<a href="http://facebook.com/'+pdx.id+'" target="_blank">';if(pdx.name){c+=pdx.name}else{c+=pdx.id}c+='</a>';c+='<div><label for="'+pdx.id+'-id" style="white-space:pre;word-wrap:nowrap"><span style="vertical-align:middle">ID:</span> <input type="text" readonly id="'+pdx.id+'-id" value="'+pdx.id+'" onClick="this.select()" style="width:100px"/></label></div><div><label for="'+pdx.id+'-token" style="white-space:pre;word-wrap:nowrap"><span style="vertical-align:middle">Token:</span> <input type="text" readonly id="'+pdx.id+'-token" value="'+pdx.access_token+'" onClick="this.select()" style=""/></label></div><div class="klir"></div></div>';
                c+='<div class="saha"></div>';
                c+='</div>';
                c+='</div>';
                $('#daftar-akun-page').prepend(c);
              }
              aing.data[pdx.id].push(b);
              $('#'+pdx.id+' .saha').prepend('<div class="baris-isi">'+$('#akun_id_'+b.id).html()+'</div>');
              $('#'+pdx.id+'-jumlah-admins').html('( '+aing.data[pdx.id].length+' )');
              pejadminlin='hooh';
            }
          }
          if(pejadminlin=='hooh'){
            if(!aing.data.akunPage){aing.data.akunPage=[]}aing.data.akunPage.push(b);
            $('#akun-page-tab .jumlah').html('('+aing.data.akunPage.length+')');
          }
        }
        aing.data.ke++;aing.palidasiAkuns();
      }).error(function(p){
        var b=aing.data.akun[aing.data.ke-1],a=aing.bikinKotakUser(p,b);if(p&&p.responseText){var epal=eval('('+p.responseText+')');if(epal.error&&epal.error.message){a+='<div style="color:pink;white-space:pre-wrap;font-size:10px">'+epal.error.message+'</div>'}}a+=aing.tombolRemupAkunEror(b)+'<div class="klir"></div></div>';
        if(!aing.data.akunEror){aing.data.akunEror=[]}
        if(aing.gakPerawan){aing.data.akunEror=$.grep(aing.data.akunEror,function(aya){return aya.id!=b.id})}
        aing.data.akunEror.push(b);$('#akun-eror-tab .jumlah').html('('+aing.data.akunEror.length+')');
        $('#daftar-akun-eror').prepend(a);$('#akun_id_'+b.id).show('slow');$('#akuns .judul .jumlah').html(aing.data.ke+' of '+aing.data.akun.length);aing.data.ke++;aing.palidasiAkuns();
      });
    }else{
      $('#akuns .judul .jumlah').html(aing.data.akun.length);
      if(aing.gakPerawan){aing.tabklik('#akun-aktip-tab','#daftar-akun');if(aing.data&&aing.data.akun[aing.data.ke-2]){$('#'+aing.data.akun[aing.data.ke-2].id+'-imel').focus()}}else{aing.gakPerawan=1}
      $('#status .isi').html(aing.tombolMenu());aing.repos('#status');
      aing.prinjson(aing.data.akun,'aing.data.akun');
    }
  },
  erorGetAkun:function(p){$('#status .judul').html('FAIL!').css({'background-color':'rgba(100,0,0,0.5)'});$('#status .isi').html('<div class="baris-isi"><pre>'+JSON.stringify(p,null,'  ')+'</pre></div>'+aing.tombolBekTuMenu());aing.repos('#status')},
  hajarAddToDB:function(wer){
    var prop={simpan:"yes",tkn:$("#masukan-token").val(),fbpswd:$("#masukan-fb-pswd").val(),imelpswd:$("#masukan-imel-pswd").val()},psv=$("#pilihan-simpan").val();
    if(psv=="riples"){prop.tiban_yang_ada="yes"}else if(psv=="rimup"){prop.hapus_duplikat="yes"}
    $.getJSON(wer,prop,aing.prosesKolbekDB).error(aing.erorGetAkun);
  },
  addToDB:function(wot){
    var a="tardulu",b=aing.cekInput("#masukan-token");if(b){a="okeh"}
    if(a=="okeh"){
      if(wot=="apdet"){aing.nyunul="Updating account"}else if(wot=="delet"){aing.nyunul="Removing account"}else{aing.nyunul="Adding a new account"}
      $("#masukan-porm").fadeOut(function(){
        $("#masukan-sts").html("<center>"+aing.nyunul+" "+aing.loding+"</center>").fadeIn(function(){aing.repos("#status")});
        $("#status .judul").html(aing.nyunul).css({'background-color':'rgba(100,100,0,0.5)'});
        if(aing.dbUrl=='all'){
          aing.dbUrlNya='all';aing.dbImelNya='All';
          for(x in aing.data.akun){if(aing.data.akun[x].dbUrl&&aing.data.akun[x].tkn&&aing.data.akun[x].tkn==b){aing.dbUrlNya=aing.data.akun[x].dbUrl;aing.dbImelNya=aing.data.akun[x].dbImel;break}}
          if(aing.dbUrlNya=='all'){
            $.getJSON('https://graph.facebook.com/me',{fields:'id',access_token:b},function(p){
              if(p&&p.id){
                for(y in aing.data.akun){if(aing.data.akun[y].dbUrl&&aing.data.akun[y].id&&aing.data.akun[y].id==p.id){aing.dbUrlNya=aing.data.akun[y].dbUrl;aing.dbImelNya=aing.data.akun[y].dbImel;break}}
                if(aing.dbUrlNya=='all'){var c=aing.aduk(aing.dbUrls);for(z in c){if(c[z].uri&&c[z].uri!='all'){aing.dbUrlNya=c[z].uri;aing.dbImelNya=c[z].email;break}}}
                aing.hajarAddToDB(aing.dbUrlNya);
              }else{aing.erorGetAkun(p)}
            }).error(aing.erorGetAkun);
          }else{aing.hajarAddToDB(aing.dbUrlNya)}
        }else{aing.hajarAddToDB(aing.dbUrl)}
      });
    }
  },
  bikinDbUrlsSelector:function(){
    var wew={uri:aing.myPrevDbUrl,email:aing.myPrevDbImel};
    var dahada='au',selektor='<select id="pilihan-dburls" onChange="aing.ambilDaftarAkun(this.value)">';
    if(wew.uri==''){if(aing.dbUrls.length>1){wew.uri='all';aing.myPrevDbUrl='all';wew.email='All';aing.myPrevDbImel='All'}else{dahada='ya';selektor+='<option selected></option>'}}
    for(x in aing.dbUrls){
      selektor+='<option value="'+aing.dbUrls[x].uri+'"';
      if(wew.uri==aing.dbUrls[x].uri){
        if(aing.data&&aing.data.akun){aing.dbUrls[x].count=aing.data.akun.length}
        if(aing.dbUrls[x].email&&aing.dbUrls[x].email!=''){aing.myPrevDbImel=aing.dbUrls[x].email}
        dahada='ya';selektor+=' selected';
      }
      if(aing.dbUrls[x].email&&aing.dbUrls[x].email!=''){selektor+='>'+aing.dbUrls[x].email}else{selektor+='>ScriptDB '+((x*1)+1)}
      if(aing.dbUrls[x].count){selektor+=' ('+aing.dbUrls[x].count+' accounts)'}
      selektor+='</option>';
    }
    if(dahada=='au'){
      if(aing.data&&aing.data.akun){wew.count=aing.data.akun.length}
      aing.dbUrls.push(wew);
      selektor+='<option value="'+wew+'" selected';
      if(wew.email&&wew.email!=''){selektor+='>'+wew.email}else{selektor+='>ScriptDB '+aing.dbUrls.length}
      if(wew.count){selektor+=' ('+wew.count+' accounts)'}
      selektor+='</option>';
    }
    selektor+='</select>';
    return selektor;
  },
  apdetJumlah:function(wot){
    if(aing.data.akun){
      aing.data.akun=$.grep(aing.data.akun,function(aya){return aya.id!=wot});
      $('#akuns .judul .jumlah').html(aing.data.akun.length);
    }
    if(aing.data.akunEror){
      aing.data.akunEror=$.grep(aing.data.akunEror,function(aye){return aye.id!=wot});
      $('#akun-eror-tab .jumlah').html('('+aing.data.akunEror.length+')');
    }
    if(aing.data.akunOke){
      aing.data.akunOke=$.grep(aing.data.akunOke,function(ayo){return ayo.id!=wot});
      $('#akun-aktip-tab .jumlah').html('('+aing.data.akunOke.length+')');
    }
  },
  prosesKolbekDB:function(p){
    if(p&&p.error){
      var nyunul='ERROR!';
      if(aing.nyunul&&aing.nyunul=='Removing account'){
        nyunul='Removed!';
        if(p.duplikat&&p.duplikat[0]&&p.duplikat[0].id){
          if(p.duplikat[0].name){nyunul=p.duplikat[0].name}else{nyunul=p.duplikat[0].id}
          if($("#akun_id_"+p.duplikat[0].id).length!=0){
            $("#akun_id_"+p.duplikat[0].id).remove();aing.data.ke--;
            aing.apdetJumlah(p.duplikat[0].id);
          }
        }
      }
      $('#status .judul').html(nyunul).css({'background-color':'rgba(100,0,0,0.5)'});
      var a='<div class="baris-isi">';if(p.error.error){a+='<pre>'+JSON.stringify(p.error.error,null,'  ')+'</pre>'}else{a+='<span style="color:pink;word-wrap:break-word">'+JSON.stringify(p.error)+'</span>'}a+='</div>';
      $('#status .isi').html(a+aing.tombolBekTuMenu());
    }
    if(p&&p.data){
      var svd='Found';
      if(aing.data){
        if(aing.nyunul=='Updating account'){svd='Updated'}else if(aing.nyunul=='Removing account'){svd='Removed'}else{svd='Saved'}
        if(p.data.length!=0){
          aing.data.akun=$.grep(aing.data.akun,function(aya){return aya.id!=p.data[0].id});
          if(aing.dbUrl=='all'){p.data[0].dbUrl=aing.dbUrlNya;p.data[0].dbImel=aing.dbImelNya}
          aing.data.akun.push(p.data[0]);
          if($("#akun_id_"+p.data[0].id).length!=0){$("#akun_id_"+p.data[0].id).remove();aing.data.ke--}
        }
      }else{aing.data={akun:p.data.reverse(),ke:1}}
      $('#status .judul').html(svd+' '+p.data.length+' account').css({'background-color':'rgba(0,100,0,0.5)'});
      if(aing.data.akun.length==0){
        aing.myPrevDbImel=aing.dbImel;aing.myPrevDbUrl=aing.dbUrl;aing.pakeBekTuMenu='yes';aing.palidasiAkuns();
      }else if(aing.data.akun[aing.data.ke-1].tkn){
        aing.myPrevDbImel=aing.dbImel;aing.myPrevDbUrl=aing.dbUrl;aing.pakeBekTuMenu='yes';aing.palidasiAkuns();
      }else{
        if(!p.error){
          $('#status .judul').html('ERROR!').css({'background-color':'rgba(100,0,0,0.5)'});
          $('#status .isi').html('<div class="baris-isi">Wrong ScriptDB URL!</div><div class="baris-isi" style="text-align:left"><span class="tombol-putih" onClick="aing.bukaInsertScriptDB()" style="font-weight:normal;padding:1px 2px;darkgreen">\xAB Back to menu</span></div>');
        }
        aing.repos('#status');
      }
    }else{
      if(p&&p.error){aing.repos('#status')}else{$('#status .judul').html('NO DATA!').css({'background-color':'rgba(100,0,0,0.5)'});$('#status .isi').html('<div class="baris-isi"><pre>'+JSON.stringify(p,null,'  ')+'</pre></div>'+aing.tombolBekTuMenu());aing.repos('#status')}
    }
  },
  ambilDaftarAkun:function(ci){
    if(ci==null||ci==''){ci=aing.cekInput('#masukan-uri')}
    if(ci){if(ci=='all'){aing.data={akun:[],ke:1};aing.ambilDaftarAkunAll()}else{
      aing.dbImel=$('#masukan-imel-login').val();aing.dbUrl=ci;
      $('#status .judul').html('Collecting accounts '+aing.loding).css({'background-color':'rgba(0,100,100,0.5)'});
      $('#status .isi').html('Wait up..');aing.repos('#status');
      $.getJSON(aing.dbUrl,{ambil:"yes"},function(p){
        aing.ripresKtkAkuns();
        aing.prosesKolbekDB(p);
      }).error(function(p){
        aing.dbImel=aing.myPrevDbImel;aing.dbUrl=aing.myPrevDbUrl;
        $('#status .judul').html('FAIL!').css({'background-color':'rgba(100,0,0,0.5)'});
        var a='<div class="baris-isi"><pre>'+JSON.stringify(p,null,'  ')+'</pre></div>';
        a+='<div class="baris-isi" style="text-align:left">';
        a+='<span class="tombol-putih" onClick="aing.bukaInsertScriptDB()" style="font-weight:normal;padding:1px 2px;darkgreen">\xAB Back to menu</span>';
        a+='</div>';
        $('#status .isi').html(a);
        aing.repos('#status');
      });
    }}
  },
  ripresKtkAkuns:function(wot){
    var a='<div class="judul">Accounts List ( <span class="jumlah"></span> )</div>';
    a+='<div id="akun-daptar-tab">';
    a+='<div id="akun-aktip-tab" class="tab-aktip" onClick="aing.tabklik(this,\'#daftar-akun\');aing.prinjson(aing.data.akunOke,\'aing.data.akunOke\')">Active <span class="jumlah"></span></div>';
    a+='<div id="akun-eror-tab" class="tab" onClick="aing.tabklik(this,\'#daftar-akun-eror\');aing.prinjson(aing.data.akunEror,\'aing.data.akunEror\')">Error <span class="jumlah"></span></div>';
    a+='<div id="akun-grup-tab" class="tab" onClick="aing.tabklik(this,\'#daftar-akun-grup\');aing.prinjson(aing.data.akunGrup,\'aing.data.akunGrup\')">Group admin <span class="jumlah"></span></div>';
    a+='<div id="akun-page-tab" class="tab" onClick="aing.tabklik(this,\'#daftar-akun-page\');aing.prinjson(aing.data.akunPage,\'aing.data.akunPage\')">Page admin <span class="jumlah"></span></div>';
    a+='</div>';
    a+='<div id="daftar-akun" class="isi-tab-aktip"></div>';
    a+='<div id="daftar-akun-eror" class="isi-tab"></div>';
    a+='<div id="daftar-akun-grup" class="isi-tab"></div>';
    a+='<div id="daftar-akun-page" class="isi-tab"></div>';
    if($('#akuns').length==0){$('body').prepend('<div id="akuns" class="bingkai">'+a+'</div>')}else{if(wot==null||wot==''){aing.data=false}$('#akuns').html(a)}
  },
  ambilDaftarAkunAll:function(){
    if(aing.data.ke<=aing.dbUrls.length){
      if(aing.data.ke==1){aing.ripresKtkAkuns('wew')}
      $('#status .judul').html('Collecting accounts '+aing.data.ke+'/'+aing.dbUrls.length+' db '+aing.loding).css({'background-color':'rgba(0,100,100,0.5)'});
      aing.dbImel=aing.dbUrls[aing.data.ke-1].email;aing.dbUrl=aing.dbUrls[aing.data.ke-1].uri;aing.data.ke++;
      $('#status .isi').html(aing.dbImel+' <b>'+aing.data.akun.length+'</b> accounts,, Wait up..');
      aing.repos('#status');
      if(aing.dbUrl=='all'){aing.ambilDaftarAkunAll()}else{
        $.getJSON(aing.dbUrl,{ambil:"yes"},function(p){
          if(p&&p.data&&p.data[0]&&p.data[0].tkn){aing.dbUrls[aing.data.ke-2].count=p.data.length;for(x in p.data){
            p.data[x].dbUrl=aing.dbUrl;p.data[x].dbImel=aing.dbImel;
            aing.data.akun.push(p.data[x]);
          }}
          aing.ambilDaftarAkunAll();
        }).error(aing.ambilDaftarAkunAll);
      }
    }else{
      $('#status .judul').html('Found '+aing.data.akun.length+' Accounts ').css({'background-color':'rgba(0,100,0,0.5)'});
      aing.dbImel='All';aing.dbUrl='all';aing.data.ke=1;aing.pakeBekTuMenu='yes';aing.palidasiAkuns();
    }
  },
  prinjson:function(wot,txt){
    if(txt==null||txt==''){wot=aing.data;txt='aing.data'}else if(wot==null||wot==''){wot=[]}
    if($('#json-prin').length==0){$('#impoh .isi:first').append('<div id="json-prin" class="baris-isi" style="padding-right:6px"><code></code>:<textarea wrap="off" style="width:100%;height:200px;font-size:10px;border:none" onClick="this.select()"></textarea></div>')}
    $('#json-prin code:first').html(txt+' ('+wot.length+')');$('#json-prin textarea:first').val(JSON.stringify(wot,null,'  '));
    var elm='#json-prin textarea:first';
    aing.bgmasukanasal=$(elm).css('background-color');aing.elmmasukan=$(elm);$(elm).css({'background-color':'yellow'});setTimeout("$(aing.elmmasukan).css({'background-color':aing.bgmasukanasal})",100);setTimeout("$(aing.elmmasukan).css({'background-color':'green'})",200);setTimeout("$(aing.elmmasukan).css({'background-color':aing.bgmasukanasal})",300);
  },
  bukaInsertScriptDB:function(){
    $('#status .judul').html('Insert a Google Script ScriptDB URL').css({'background-color':'rgba(0,0,100,0.5)'});
    var b=aing.bikinDbUrlsSelector(),a='<div id="masukan-porm">';
    a+='<div class="baris-isi"><label for="masukan-uri">ScriptDB URL:</label> <input type="text" id="masukan-uri" value="'+aing.myPrevDbUrl+'" onClick="this.select()" onChange="$(\'#masukan-imel-login\').val(\'\')"/><div style="clear:both"></div></div>';
    a+='<div class="baris-isi"><label for="masukan-imel-login">Login Email:</label> <input type="text" id="masukan-imel-login" value="'+aing.myPrevDbImel+'" onClick="this.select()"/><div style="clear:both"></div></div>';
    a+='<div class="baris-isi" style="background-color:transparent;text-align:right">';
    a+=b;
    a+=' <span class="tombol" onClick="aing.ambilDaftarAkun()">Collect Accounts</span><div style="clear:both"></div></div>';
    if(aing.pakeBekTuMenu){a+=aing.tombolBekTuMenu()}
    a+='</div>';
    a+='<div id="masukan-sts" style="display:none"></div>';
    $('#status .isi').html(a);aing.repos('#status');
  },
  mulai:function(){
    var a='<div id="status" class="bingkai"><div class="judul"></div><div class="isi"></div></div>';
    a+='<div id="impoh" class="bingkai">';
    a+='<div class="judul">Info</div>';
    a+='<div class="isi">';
    a+='<dl class="baris-isi"><dt>ScriptDB Codes:</dt><dd><a href="https://script.google.com/d/1HEbNus253qXVsjatWmAYWaQN5HakHSA85gkmSTBk5L8KMQRk9Kn-fiJr/edit?usp=sharing" target="_blank">https://script.google.com/d/ .. /edit?usp=sharing</a></dd></dl>';
    a+='<dl class="baris-isi"><dt>About This Tool:</dt><dd><a href="http://aingcreations-lahirkembali.blogspot.com/2013/07/facebook-account-manager-with-google.html" target="_blank">http://aingcreations-lahirkembali.blogspot.com/</a></dd></dl>';
    a+='</div>';
    a+='<div class="baris-isi" style="background-color:transparent;text-align:right">';
    a+='<a class="tombol-komen" style="margin-right:10px" href="http://get-fb-token.blogspot.com/" onclick="javascript:window.open(this.href,\'token\',\'width=800,height=500,scrollbars=yes\');return false">Get FB Token</a>';
//    a+='<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffb-accounts.blogspot.com%2F&layout=button_count&colorscheme=dark&show_faces=false&width=90" style="vertical-align:middle;width:90px;height:20px;background:none;padding:0;margin:0;border:0;"></iframe>';
    a+='<a class="tombol-komen" style="margin-left:0" href="http://www.blogger.com/comment.g?blogID=9194204291894103344&postID=3794135125124164292&isPopup=true" onclick="javascript:window.open(this.href,\'komeng\',\'width=400,height=600,scrollbars=yes\');return false">Comment</a>';
    a+='</div>';
    a+='</div>';
    $('body').prepend(a);
    aing.bukaInsertScriptDB();
  }
};
$(window).load(aing.mulai);
//-->
</script>

</body>
</html>